<extend name="Base/common"/>
<block name="body">

		<!--首页-->
		<div id="MyCare">
			<header>
				<a href="{:U('Index/index')}" class="back"><img src="__IMG__/images/back_03.png"/></a>
				我的收藏
				<a href="javascript:;" class="sure">编辑</a>
			</header>
			<div class="tag">
				<a href="__ACTION__/teaching/2"><span <eq name="Think.get.teaching" value="2">class="checked"</eq>>老师</span></a>
				<a href="__ACTION__/teaching/1"><span <eq name="Think.get.teaching" value="1">class="checked"</eq>>学生</span></a>
			</div>
			
			<form action="__SELF__" method="post" class="form-horizontal">
			<div class="indexList">
				<div class="IndexList">
					<ul class="like block">
					<volist name="collectList" id="v">
						<li>
							<img src="__IMG__/images/bianj_03.png" class="bianj1"/>
							<input type="checkbox" name="ids[]" value="{$v.id}" style="display: none;" />
							<div class="per">
								<a href="javascript:;" class="f-fl detail"><img src="__ROOT__{$v.logo|getimg=###}"/></a>
								<div class="f-fl">
									<h1>
										<a href="__MODULE__/UserMember/userDetail/uid/{$v.c_uid}/teaching/{$Think.get.teaching}">{$v.nickname}</a><img src="__IMG__/images/
											<switch name='v.sex'>
												<case value='1'>nan_03.png</case>
												<case value='2'>girl_03.png</case>
											</switch>
										"/><span>{$v.minsalary}元/小时</span>
									</h1>
									<p class="moren"><img src="__IMG__/images/idxe_18.jpg"/>
										<switch name="Think.get.teaching">
											<case value="1">想学</case>
											<case value="2">授课</case>
										</switch>:
										<volist name="v.courses" id="c">
										{$c}&emsp;
										</volist>
									</p>
									<eq name="Think.get.teaching" value="2"><p><img src="__IMG__/images/idxe_24.jpg"/> 教过: {$v.students}</p></eq>
									<p><img src="__IMG__/images/idxe_27.jpg"/>地址: {$v.area_id|getArea=###}</p>
									<img src="__IMG__/images/idxe_21.jpg"/ class="posi">
								</div>
								<div class="clear"></div>
							</div>
						
						</li>
					</volist>
					</ul>
					<input type="submit" id="btn" name=""  value="删除" class="ajax-post" target-form="form-horizontal" style="display: none;" />
				</div>
			</div>
			</form>
		</div>
<script>
	$(function(){
		var medi=true;
		var medi1='';
		$('#MyCare header .sure').click(function(){
			if(medi){
				$('.per').css('transform','translateX(30px)');
				$('.bianj1').show(300).attr('src','__IMG__/images/bianj_03.png');
				$('#MyCare header .sure').text('取消');
				$('#btn').slideDown('300');
				medi1=medi;
				$('.f-fl').unbind('click');
			}else{
				$('.per').css('transform','translateX(0px)');
				$('.bianj1').hide(300).attr('src','__IMG__/images/bianj_03.png');
				$('#MyCare header .sure').text('编辑');
				$('#btn').slideUp('300');
				$('.f-fl').bind('click',function(){
					location.href = $('.f-fl h1 a').attr('href');
				});
			}
			medi=!medi;
		});
		$('#MyCare .IndexList li').click(function(){
					if(medi1){
						$(this).css('background','#faf8f8');
						$(this).find('.bianj1').attr('src','__IMG__/images/bianj_06.png').next('input').attr('checked',true);
					}else{
						$(this).css('background','#fff');
						$(this).find('.bianj1').attr('src','__IMG__/images/bianj_03.png').next('input').removeAttr('checked');
					}
					medi1=!medi1;
		});
		$('.f-fl').click(function(){
			location.href = $('.f-fl h1 a').attr('href');
		})
	});
</script>
</block>